﻿import QtQuick 2.12
import QtQuick.Controls 2.12


Rectangle {
    id: main_page
    color: "white"
    anchors.fill: parent

    MyGroupBox {
        id: groupBox_UartConfig
        idname: "UartConfig"
        text: "Uart Configuration"
        width: parent.width / 3
        height: parent.height * 0.6
        mComponent: component_UartConfig
        // is_debug: false
    }

    MyGroupBox {
        id: groupBox_SwitchStatus
        idname: "Switch Status"
        text: "Switch Status"
        width: parent.width / 3
        height: parent.height * 0.6
        anchors.left: groupBox_UartConfig.right
        // is_debug: false
        mComponent: component_SwitchStatus
    }

    MyGroupBox {
        id: groupBox_PorxyConfig
        idname: "PorxyConfig"
        text: "Porxy Configuration"
        width: parent.width / 3
        height: parent.height * 0.6
        anchors.left: groupBox_SwitchStatus.right
        mComponent: component_PorxyConfig
    }

    MyGroupBox {
        id: groupBox_Logs
        idname: "Logs"
        text: "Logs"
        width: parent.width
        height: parent.height * 0.4
        mComponent: component_Logs
        anchors.top: groupBox_UartConfig.bottom
    }


    // Uart Config Box
    Component {
        id: component_UartConfig
        UartConfigRect { }
    }

    // Switch Status Box
    Component {
        id: component_SwitchStatus
        SwitchRect { }
    }

    // Porxy Config Box
    Component {
        id: component_PorxyConfig
        PorxyConfigRect { }
    }

    // Logs Box
    Component {
        id: component_Logs
        LogsBoxRect { }
    }
}
